home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / shell / ncd-0.000 / ncd-0 / ncd-0.9.8 / ncd.man < prev    next >
Encoding:
Text File  |  1995-05-05  |  13.8 KB  |  397 lines

  1.  
  2.  
  3.  
  4. NCD(1)                               NCD(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        ncd - Ninux Change Directory: browse & select directories
  9.  
  10.  
  11. SSYYNNOOPPSSIISS
  12.        nnccdd [ --ooppttiioonnss ]     [ ddiirreeccttoorryy ]
  13.  
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.        nnccdd  is    an  interactive fullscreen directory browser that
  17.        lets you select and change to the  desired  directory.  It
  18.        also  lets you change quickly in non-interactive mode to a
  19.        directory selected in  the  command  line.   nnccdd     supports
  20.        incomplete  directory  specification  in the command line,
  21.        and is able to perform automatic search in browser mode.
  22.  
  23.        If you provide a directory name in the command  line,  nnccdd
  24.        will  run  in non-interactive mode, and will try to change
  25.        to the next directory that matches completely or partially
  26.        the specified one.
  27.  
  28.        If you don't provide a directory name in the command line,
  29.        nnccdd will run in interactive mode. You can  browse  up  and
  30.        down  the  directory  tree,  search  for     a directory, and
  31.        accept or cancel the selection of a  directory  to  change
  32.        to.
  33.  
  34.        To  get    a  faster  response,  nnccdd  keeps a directory tree
  35.        database in the user's home directory (obtained from $$HHOOMMEE
  36.        environment variable). The database actually consists on a
  37.        couple of files: ..nnccdd__hhttrreeee, that keeps the directory tree
  38.        starting from the user home directory, and ..nnccdd__ffttrreeee that
  39.        keeps the full system directory tree,  starting    from  the
  40.        root  directory    //.  All the home tree stored somewhere in
  41.        the full tree file ..nnccdd__ffttrreeee  is  discarded,  and  it  is
  42.        recreated based on the home tree read from ..nnccdd__hhttrreeee.  In
  43.        this way, the user can add/delete  directories  below  his
  44.        home  directory    and  rebuild  just  the     home ..nnccdd__hhttrreeee.
  45.        database, avoiding to rebuild the long ..nnccdd__ffrreeee full sys-
  46.        tem tree.
  47.  
  48.        The program can run in two scope modes: hhoommee--ssccooppee mode or
  49.        ffuullll--ssccooppee mode.     In hhoommee--ssccooppee mode, only the home direc-
  50.        tory tree is available, and the program has no view of any
  51.        directory external to this local tree. In ffuullll--ssccooppee mode,
  52.        the full system tree starting from // is available for view
  53.        and search operations. Normally the mode is  automatically
  54.        selected based on the current work directory at invocation
  55.        time: hhoommee--ssccooppee mode is selected if the current directory
  56.        is located under the home directory. Otherwise, ffuullll--ssccooppee
  57.        is selected. This behaviour can be overriden using command
  58.        line  options.  If  you specify a directory in the command
  59.        line (non-interactive mode) you    can  easily  force  ffuullll--
  60.        ssccooppee  mode  starting  the  directory name with a slash //.
  61.  
  62.  
  63.  
  64. ncd               20 May 1995                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NCD(1)                               NCD(1)
  71.  
  72.  
  73.        This does not mean that the directory must hang    from  the
  74.        root  directory;     to  do this, add two slashes, except for
  75.        root directory selection, that just needs one slash.
  76.  
  77.        If the current work directory at invocation  time  is  not
  78.        registered  in  the  program  database files, the database
  79.        (home or full depending on scope     mode)    is  automatically
  80.        rebuilt. This can be overriden using command line options.
  81.  
  82.  
  83. CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS
  84.        You can supply command line options to customize some  ncd
  85.        actions.     Options  can  be grouped behind a single --.  You
  86.        can also specify default options in the NNCCDD__OOPPTTSS     environ-
  87.        ment  variable,    using  the  same sintax as in the command
  88.        line. Command line options override NNCCDD__OOPPTTSS options.
  89.  
  90.        This is a list of the supported command line options:
  91.  
  92.        --ff     select  full-scope  mode    (starting  from     //).   On
  93.           rebuild,     both    ..nnccdd__ffttrreeee   and  ..nnccdd__hhttrreeee  are
  94.           rebuilt.
  95.  
  96.        --hh     select home-scope mode (starting from  $$HHOOMMEE).   On
  97.           rebuild, only ..nnccdd__hhttrreeee is rebuilt.
  98.  
  99.        --HH     select automatic-scope mode. This will choose full-
  100.           scope or home-scope depending on the current  work-
  101.           ing  directory  at  invocation  time.   This is the
  102.           ddeeffaauulltt scope mode.
  103.  
  104.        --rr     force  rebuilding     the  database    (home  or   full,
  105.           depending on the scope mode).
  106.  
  107.        --RR     disable  the database forced rebuild.  This cancels
  108.           any previous --rr, but does not cancel  an    automatic
  109.           rebuild (use --AA to cancel that one).
  110.  
  111.        --aa     select  automatic     rebuild  mode.      if  the current
  112.           working directory at invocation time is not in  the
  113.           program  database,  a rebuild is performed (home or
  114.           full, depending on the scope mode).   This  is  the
  115.           ddeeffaauulltt auto-rebuild mode.
  116.  
  117.        --AA     disable automatic rebuild mode.
  118.  
  119.        --vv     Verbose  on.  Usefull  for debug purposes or if you
  120.           get bored while rebuilding the full tree.
  121.  
  122.        --VV     Verbose off. This is the ddeeffaauulltt verbose mode.
  123.  
  124.        --dd     dumps directory tree. This will make a nice listing
  125.           of  the  directory  tree    to  stdout (home or full,
  126.           depending on the scope). Just usefull to export the
  127.  
  128.  
  129.  
  130. ncd               20 May 1995                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NCD(1)                               NCD(1)
  137.  
  138.  
  139.           directory     tree  to  a text file.     The program will
  140.           exit inmediately after the  listing,  returning  an
  141.           error  code (not 0), it will not perform any change
  142.           directory operation.
  143.  
  144.        --DD     Cancels any previous --dd.
  145.  
  146.        --tt     Force text-chars display of the directory tree.  If
  147.           not  forced,  curses  line-art characters are used.
  148.           Curses chars are    nice  on  terminals  that  suport
  149.           line-art characters (as the linux console), but you
  150.           get an ugly view on other terminal  types.  If  you
  151.           use --tt, you get a bit better display.
  152.  
  153.        --TT     cancels  any previous --tt and also cancels automatic
  154.           line-art/text-char select ( --xx ).     So  this  forces
  155.           curses chars display.
  156.  
  157.        --xx     selects  automatically  line-art/text-chars display
  158.           of the directory tree.  This is the ddeeffaauulltt.
  159.  
  160.        --ll     View expanded links ( llddiirr -->> ddiirr// )
  161.  
  162.        --LL     View  compacted  links  (     llddiirr@@    ).  This  is  the
  163.           ddeeffaauulltt.
  164.  
  165.        --?? --ii  Shows a summary of command line options.
  166.  
  167.  
  168. BBRROOWWSSEERR KKEEYYSS
  169.        When invoqued in interactive mode, these are the character
  170.        sequences and keys to use the browser.
  171.  
  172.  
  173.        KKeeyyDDoowwnn oorr CCttrrll++NN::
  174.           Move down (next brother).
  175.  
  176.        KKeeyyUUpp oorr CCttrrll++PP::
  177.           Move up (previous brother).
  178.  
  179.        KKeeyyLLeefftt oorr CCttrrll++BB::
  180.           Move left (father).
  181.  
  182.        KKeeyyRRiigghhtt oorr CCttrrll++FF::
  183.           Move right (son).
  184.  
  185.        KKeeyyHHoommee oorr CCttrrll++AA::
  186.           Move to first directory in tree ( $$HHOOMMEE or // ).
  187.  
  188.        KKeeyyEEnndd oorr CCttrrll++EE::
  189.           Move to last descendant of current node.
  190.  
  191.        KKeeyyPPggUUpp oorr CCttrrll++UU::
  192.           Move one page up.
  193.  
  194.  
  195.  
  196. ncd               20 May 1995                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NCD(1)                               NCD(1)
  203.  
  204.  
  205.        KKeeyyPPggDDnn oorr CCttrrll++VV::
  206.           Move one page down.
  207.  
  208.        KKeeyyFF77 oorr CCttrrll++OO::
  209.           Last directory of previous line.
  210.  
  211.        KKeeyyFF88 oorr CCttrrll++JJ::
  212.           First directory of next line.
  213.  
  214.        CCttrrll++TT::
  215.           Opposite    movement  of  KKeeyyRRiigghhtt.      This     is   not
  216.           KKeeyyLLeefftt.     KKeeyylleefftt  moves back to the father direc-
  217.           tory.
  218.  
  219.        KKeeyyTTeexxtt ((aannyy tteexxtt kkeeyy oorr ddiissppllaayyaabbllee cchhaarraacctteerr))::
  220.           Adds the character to the search string. As you add
  221.           chars,  the program will try to match the resulting
  222.           string to a directory in the tree. If no    match  is
  223.           possible,     the  character is rejected. The match is
  224.           partial, so it is not necessary  to  type     a  whole
  225.           directory     name to match it. If you want to force a
  226.           total match, add a final    slash  //  to  the  search
  227.           string.  After you add a slash you can go on adding
  228.           chars, so actually the search is not limited  to    a
  229.           simple  directory     name,    but  can  also search for
  230.           paths.
  231.  
  232.        KKeeyyFF99 oorr CCttrrll++KK::
  233.           Move to next directory  that  matches  the  current
  234.           search field.
  235.  
  236.        BBaacckkssppaaccee oorr CCttrrll++HH::
  237.           Delete last character from the search field.
  238.  
  239.        DDeell oorr CCttrrll++DD::
  240.           Clears completely the search field.
  241.  
  242.        KKeeyyFF55 oorr CCttrrll++LL::
  243.           If  the  current    selection is a link, follow it to
  244.           the destination directory.
  245.  
  246.        KKeeyyFF66 oorr CCttrrll++GG::
  247.           Toggles between viewing expanded links  (     llddiirr  -->>
  248.           ddiirr//  )  and compacted links ( llddiirr@@ ). The initial
  249.           mode is command line selected using --ll and --LL.  The
  250.           default mode is to show compacted links.
  251.  
  252.        KKeeyyFF44 oorr CCttrrll++WW::
  253.           Repaint  the  full screen. Use this when some back-
  254.           ground process disturbs your display, or some other
  255.           user tries to wwrriittee(1) or ttaallkk(1) to you.
  256.  
  257.        KKeeyyFF22 oorr CCttrrll++RR::
  258.           Performs    a  directory  tree  rescan. The directory
  259.  
  260.  
  261.  
  262. ncd               20 May 1995                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NCD(1)                               NCD(1)
  269.  
  270.  
  271.           database is rebuilt (home or full, depending on the
  272.           scope mode).
  273.  
  274.        KKeeyyFF33 oorr CCttrrll++YY::
  275.           Toggle the scope mode, between home and full scope.
  276.  
  277.        RReettuurrnn oorr EEnntteerr oorr CCttrrll++MM::
  278.           Accepts the directory selected, and exits     changing
  279.           the current working directory to it.
  280.  
  281.        KKeeyyFF1100 oorr EEsscc oorr CCttrrll++XX oorr MMeettaa++XX::
  282.           Quit. Cancels directory selection.
  283.  
  284.        KKeeyyFF11 oorr CCttrrll++II::
  285.           Displays a little help screen.
  286.  
  287.  
  288. SSHHEELLLL AALLIIAASS//FFUUNNCCTTIIOONN
  289.        nnccdd  is actually an executable binary and a shell alias or
  290.        function that calls it; in this way,  we     can  change  the
  291.        working    directory  of the current shell. The return value
  292.        of the binary executable is 00 if the user has  selected    a
  293.        valid  directory.  On  error  or if the operation has been
  294.        cancelled, the program returns a     value    ddiiffffeerreenntt  ttoo  00.
  295.        The   destination   directory  is  returned  in    the  file
  296.        $$HHOOMMEE//nnccdd__ssddiirr allows blind changing to the directory kept
  297.        in  $$HHOOMMEE//nnccdd__ssddiirr without testing the return value of the
  298.        program.
  299.  
  300.        Assuming that the  binary  program  is  //uussrr//bbiinn//nnccdd,  the
  301.        shell alias/function should be the following,
  302.  
  303.        for the bbaasshh sshheellll, define this function:
  304.  
  305.          function ncd()
  306.          {
  307.         /usr/bin/ncd $*;
  308.         if [ $? = 0 ]; then
  309.            cd "$(cat $HOME/.ncd_sdir)";
  310.         fi
  311.          }
  312.  
  313.        for  the     ttccsshh sshheellll, define this alias (here shown in two
  314.        lines; actually it's just one line):
  315.  
  316.       alias ncd '/usr/bin/ncd * ;
  317.              if $? == 0 cd "`cat $HOME/.ncd_sdir`" '
  318.  
  319.        You can include this alias/function in your login  script,
  320.        or in the system wide login script. See bbaasshh(1) or ttccsshh(1)
  321.        manpages for help on this.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328. ncd               20 May 1995                5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. NCD(1)                               NCD(1)
  335.  
  336.  
  337. EENNVVIIRROONNMMEENNTT
  338.        NNCCDD__OOPPTTSS
  339.           You can specify default options in this environment
  340.           variable,     using    the same sintax as in the command
  341.           line. Command line options override  NNCCDD__OOPPTTSS  val-
  342.           ues.
  343.  
  344.  
  345. FFIILLEESS
  346.        $$HHOOMMEE//..nnccdd__hhttrreeee home tree database.
  347.  
  348.        $$HHOOMMEE//..nnccdd__ffttrreeee full tree database.
  349.  
  350.        $$HHOOMMEE//..nnccdd__ssddiirr directory selected in last execution.
  351.  
  352.  
  353. AAUUTTHHOORR
  354.      Borja Etxebarria <borja@bips.bi.ehu.es>
  355.               <jtbecgob@s835cc.bi.ehu.es>
  356.  
  357.  
  358. BBUUGGSS
  359.        Sure a lot.
  360.  
  361.        Please,    report    any  bug  or  improvement  to  the author
  362.        Include a complete, self-contained example that will allow
  363.        the bug to be reproduced, and say which version of ncd you
  364.        are using.
  365.  
  366.  
  367. CCOOPPYYRRIIGGHHTT
  368.        Copyright (C) 1995, Borja Etxebarria
  369.                Basque Country University
  370.  
  371.        This program is free software;  you  can     redistribute  it
  372.        and/or modify it under the terms of the GNU General Public
  373.        License as published by the Free Software Foundation.
  374.  
  375.        This program is distributed in the hope that  it     will  be
  376.        useful, but WITHOUT ANY WARRANTY; without even the implied
  377.        warranty of MERCHANTABILITY or FITNESS  FOR  A  PARTICULAR
  378.        PURPOSE.      See  the  GNU     General  Public License for more
  379.        details.
  380.  
  381.        You should have received a copy of the GNU General  Public
  382.        License along with this program; if not, write to the Free
  383.        Software Foundation, Inc., 675  Mass  Ave,  Cambridge,  MA
  384.        02139, USA.
  385.  
  386.  
  387. SSEEEE AALLSSOO
  388.        bbaasshh(1), ttccsshh(1)
  389.  
  390.  
  391.  
  392.  
  393.  
  394. ncd               20 May 1995                6
  395.  
  396.  
  397.